<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
class FormModel extends CI_Model {
 
    function __construct() {
        parent::__construct();
    }
 
    function get($search) {     
        $query = $this->mongo_db->get_where('forms', $search);
        if($query){
        	$row = $query[0];
        	return $row;
        }else{
        	return null;
        }
    }
     
    function create($form) {
        $this->mongo_db->insert('forms', $form);
    }
 
}
 
?>